<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <link rel="stylesheet" href="../../lib/reset.css">
    <link rel="stylesheet" href="../../lib/com-base.css">
    <link rel="stylesheet" href="com-radio.css">
    <script src="../../lib/jquery.js"></script>
    <script src="com-radio.js"></script>
</head>
<body>

<div class="demo clearfix">

    <section id="radio-1" class="com-radio">
        <label>
            <input name="radio-1" type="radio" value="小明">
            <i data-name="radioBox" class="radio-box"></i>
            <span>小明</span>
        </label>

        <label class="ml10">
            <input name="radio-1" type="radio" value="小红">
            <i data-name="radioBox" class="radio-box"></i>
            <span>小红</span>
        </label>
    </section>



    <input type="button" id="get" value="点击我" class="mt20">

</div>

<script>

    var arr = [
        {
            id:1,
            text:'苹果'
        },
        {
            id:2,
            text:'橘子'
        }
    ];

    $('.com-radio').comRadio();

    $('#get').click(function(){

        console.log($('#radio-1').find(":radio:checked").val())

    })


</script>
</body>
</html>